package com.chsi.onjava8.stream;

import static java.util.stream.IntStream.range;

/**
 * @Auther shikf
 * @Date 2020-06-21 16:42
 */
public class Repeat {
    public static void repeat(int n, Runnable action) {
        range(0, n).forEach(i -> action.run());
    }
}
